# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=dooit
pkgver=2.1.0
pkgrel=0
pkgdesc="TUI todo manager"
url="https://github.com/kraanzu/dooit"
arch="noarch"
license="MIT"
depends="
	python3
	py3-appdirs
	py3-dateparser
	py3-psutil
	py3-pyperclip
	py3-textual
	py3-tzlocal
	py3-yaml
	"
makedepends="py3-gpep517 py3-poetry-core"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kraanzu/dooit/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # no testsuite

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
fb59ca160999c4f188d8369997134807b214d6ce9bdf04c4407a05eff7cb7037d4dc6075a16443f6482e32268d322b74f0ae6611c30be11457fb7ca4d755cec5  dooit-2.1.0.tar.gz
"
